package com.example.service.impl;

import com.example.mapper.BusinessMapper;
import com.example.model.Business;
import com.example.model.dlo.BusinessEditRequest;
import com.example.service.BusinessService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@RequiredArgsConstructor
@Service
public class BusinessServiceImpl implements BusinessService {
    private final BusinessMapper businessMapper;
    @Override
    public List<Business> getBusinessList() {
        return businessMapper.getBusinessList();
    }

    @Override
    public List<Business> getTop5Businesses() {
        return businessMapper.getTop5Businesses();
    }

    @Override
    public void insertBusiness(Business business) {
        businessMapper.insert(business);
    }

    @Override
    public void updateById(Business business) {
        businessMapper.updateById(business);
    }

    @Override
    public void deleteBusinessById(int id) {
        businessMapper.deleteBusinessById(id);
    }
}
